package com.twu.biblioteca;

import java.io.*;
import java.util.Scanner;

public class BibliotecaApp {

    private PrintStream printStream;
    private InformationPrinter informationPrinter;

    public BibliotecaApp(PrintStream printStream, InformationPrinter informationPrinter) {
        this.printStream = printStream;
        this.informationPrinter = informationPrinter;
    }

    public void run() throws IOException {
        informationPrinter.printWelcome();
        informationPrinter.printMenuOptions();
        retrieveUserOption();
    }

    public String retrieveUserOption() throws IOException {
        String input = new Scanner(System.in).nextLine();
        if(!input.equals("1") && !input.equals("2")) {
            input = "Invalid Option Selected";
        }
        return input;
    }
}
